home *** CD-ROM | disk | FTP | other *** search
- ═══════════ Turbo 4.0/5.0 subprocess demonstration package ════════════
-
- TP-123 3/16/89 Richard W. Prescott
-
- This package illustrates a method for writing TP4/5 interrupt
- routines to modify the behavior of an existing program which
- is executed as a subprocess. The interrupt hook and return
- procedures are written in assembly language, however the
- remainder of the application can be written entirely in Pascal,
- and can Chain or Return from Interrupt from any point in the
- Pascal Code. All source code is provided, and all assembly
- source code is contained in the Units T5DOS and INTR16 which are
- provided in both source and compiled form. Users without an
- assembler can redesign everything but the interrupt hook and
- return procedures.
-
- Files provided in this package:
-
- README (This file)
- INTR16.PAS Interrupt Unit (Pas/Asm Source)
- INTR16.TPU Interrupt Unit (Compiled w Turbo Version 4.0)
- INTR16.TP5 Interrupt Unit (Compiled w Turbo Version 5.0)
- T5DOS.PAS Implements Turbo 5.0 DOS Routines (Pas/Asm Source)
- T5DOS.TPU Implements Turbo 5.0 DOS Routines (Compiled w Turbo 4)
- RUN123.PAS Program to Run 123 as a subprocess (Pascal Source)
- RUN123.EXE Program to Run 123 as a subprocess (Compiled)
-
-
- The sample interrupt Unit provided installs an interrupt handler
- for Interrupt $16 (BIOS Keyboard Services). Routines are
- provided to return (IRET) to the calling program or to Chain to
- the next program in the interrupt chain. These routines can be
- invoked from any point in the Pascal service routine. Simple and
- obvious modifications can be made to the interrupt unit to create
- handlers for other interrupts.
-
-
- The program RUN123 provides a concrete example of a program which
- uses the INTR16 Interrupt Unit to modify the behavior of a
- subprocess. It can be used to run 123.COM, load a designated
- worksheet, and execute a series of keyboard entries (eg: printing
- a range, or executing a macro) as specified on the RUN123 command
- line. The Pascal code can be easily modified to enable similar
- batch style execution (via command line parameters) of other
- keyboard oriented programs.
-
- The command line should consist of a series of blocks of ordinary
- printable characters, 123 Alt-Letter commands (eg "\A") and 123
- macro commands ( {right}, {home}, {name}, etc ), separated by
- spaces. (Spaces are required between macro and Alt- commands,
- and are optional between ordinary characters. It is not possible
- to specify a space as a keyboard entry). Carriage returns should
- be specified using the 123 symbol "~".
-
- If RUN123 finds an error on the command line it will terminate
- (without executing 123) and set the DOS ErrorLevel to 2. Use
- "IF ErrorLevel" as described in your DOS Manual to test for
- successful execution within a batch file.
-
- If the first parameter does NOT begin with a "/" menu command, it
- is interpreted as a file to be loaded. Thus:
-
- Run123 MyWks
- is the same as:
- Run123 /fr MyWks.wk1 ~
-
- Other Examples:
-
- To load MYWKS.WK1, execute the print macro Alt-P, and exit:
-
- Run123 MyWks \p /qy
-
- To load MYWKS.WK1 and display a full screen list of range names
- to go to:
-
- Run123 MyWks {goto} {name} {name}
-
- To run 123 and display a full screen list of files to load from
- the directory C:\MYDIR:
-
- Run123 /wgdd {esc} C:\MYDIR ~q /fr {name}
-
-
- Please refer to RUN123.PAS for a complete list of the supported
- 123 macro keys.
-
- Note that RUN123 could not be written using the built-in
- "Interrupt Procedure" provided in Turbo version 4/5, since it
- does not provide for chaining to the previous interrupt vector.
-
-
- The Units T5DOS and INTR16 were compiled and assembled using
- Turbo Pascal Version 4.0 and TP&Asm Version 2 ß. TP&Asm provides
- an integrated compile-time assembler within the Turbo development
- environment (and the command line compiler TPC). The result is an
- ASSEMBLY Development Environment which is identical to your PASCAL
- Development Environment, and which allows you to mix assembly
- language sections freely within your Pascal code and to make
- simplified assembly references to all Pascal variables. It
- provides fast assembly with no additional disk access, and reports
- assembly syntax errors on the standard Turbo error line with
- cursor placed on the error. It accepts the standard syntax of
- both MASM and A86, but also provides certain enhancements such as
- the placement of named data in the Code Segment which is used in
- the interrupt unit INTR16.
-
- TP&Asm Version 2.0 will be available from me for $49 plus $3 P&H.
- The current Beta Test Version 2 ß is available now for $39 plus $3
- P&H, with a free upgrade to 2.0 when it becomes available.
-
- A shareable Memory Mode version called TP&Asm-M is also available.
- TP&Asm-M provides the same assembly language capabilities as TPA,
- but is intended only for assembly language development within the
- Turbo 4.0 or 5.0 integrated environments, and therefore does not
- have the capability of compiling to disk. (You can of course read
- and save Pascal and Assembly SOURCE files with both programs).
-
- The TP&Asm-M distribution disk can be ordered from me for $5 plus
- $3 P&H, with the $5 being credited toward subsequent registration
- of TP&Asm or TP&Asm-M. It can also be downloaded from the IBMPRO
- or BPROGA forums on CompUServe. Look for TPA2-A.ARC and TPA2-R.ARC.
-
-
- To order TP&Asm, please send a check or money order payable to:
-
- Richard W. Prescott
- 724 Sauk Ridge Trail
- Madison, WI 53705
-
- Please include the following information:
-
- 1. Full Version number of the Turbo Pascal compiler you now use.
-
- 2. Your registration number for that compiler.
-
- 3. If you obtained TP&Asm-M from a bulletin board:
- 3a. Area code and phone number of that bulletin board
- 3b. Full Version number of the TP&Asm-M version you have
- 3c. Directory Date of the README file
-
-
- The source and compiled code in this package is copyrighted as
- indicated. You may share this package and/or upload it to
- bulletin boards as long as no fee is charged. You may of course
- make modifications to these programs for your own use, and you may
- distribute these modifications with the package. The original
- unmodified files must all be present.
-
- Registered owners of TP&Asm may distribute programs using any of
- the source code or compiled units in this package in original or
- modified form. Please give appropriate credit.
-
- If you distribute programs written using TP&Asm, please help me
- spread the word by including a statement like the following:
-
- This program was compiled and assembled using
- Turbo Pascal Version xxx and TP&Asm Version yyy.
-
-